package com.qing.write

import org.apache.lucene.document.{Document, Field, TextField}

/**
  * Created by wuliao on 2017/8/21.
  */
private[write] abstract class Parse2Document {

  def parse(s: String): Document = {
    val document = new Document()
    document.add(new Field("_all", s, TextField.TYPE_STORED))
    parseStrIntoDoc(s,document)
    document
  }

  def parseStrIntoDoc(s:String,doc:Document)
}
